异地组网:Tailscale Subnet 在 Linux 6.8.0-56 内核下的坑

在一次系统更新过程中,发现更新到 Ubuntu 24.04.2 LTS (GNU/Linux 6.8.0-56-generic x86_64) 后,Tailscale Subnet 无法生效了。

查看 tailscale status 发现存在报错:

$ tailscale status
<< hosts, as usual >>

# Health check:
#     - adding [-i tailscale0 -j MARK --set-mark 0x40000/0xff0000] in v6/filter/ts-forward: running [/usr/sbin/ip6tables -t filter -A ts-forward -i tailscale0 -j MARK --set-mark 0x40000/0xff0000 --wait]: exit status 2: Warning: Extension MARK revision 0 not supported, missing kernel module?
ip6tables v1.8.10 (nf_tables): MARK: bad value for option "--set-mark", or out of range (0-4294967295).

Try `ip6tables -h' or 'ip6tables --help' for more information.

我选择了第三种方法:

$ sudo nano /etc/default/tailscaled

然后在配置文件末尾增加一行

# Temporary fix for linux-image-6.8.0-58-generic
TS_DEBUG_FIREWALL_MODE=nftables

其目的是显式指定 Tailscale 强制使用 nftables 创建防火墙规则,而不是 ip6tables 。

然后重启服务 sudo systemctl restart tailscaled